package com.haitao.jt808.handler;

import com.haitao.jt808.entity.annotation.Jt808Pack;
import com.haitao.jt808.entity.gpsdata.Data0x8001;
import com.haitao.jt808.entity.gpsdata.DataPackage;
import lombok.extern.slf4j.Slf4j;

/**
 * 终端心跳命令
 *
 * @author shenhaitao
 */
@Slf4j
@Jt808Pack(msgId = 0x0002)
public class Handler0x0002 implements PackHandler {

    @Override
    public DataPackage handle(DataPackage msg, int flowId) {
        log.debug("[终端心跳包] 终端手机号: {}", msg.getHeader().getTerminalPhone());
        return Data0x8001.response(msg, flowId, Data0x8001.SUCCESS);
    }

}
